]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: don't fail if we can't read a connection associated with an active
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 8 Jun 2013 13:24:20 +0000 (15:24 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Fri, 14 Jun 2013 18:38:54 +0000 (20:38 +0200)
It can happen in legitimate cases, such as a version incompatibility
between NetworkManager and libnm-glib or a restricted permission.

https://bugzilla.gnome.org/show_bug.cgi?id=701849

js/ui/status/network.js

index 747b5a0b0b3975d21a8994b91a90a65c76830d9f..923aaeaf4c55a085364b72a9d5a2e89f91018822 100644 (file)
@@ -1711,8 +1711,12 @@ const NMApplet = new Lang.Class({
 
             // Ignore slave connections
             let connectionPath = activeConnections[i].connection;
-            let connection = this._settings.get_connection_by_path(connectionPath)
-            if (this._ignoreConnection(connection))
+            let connection = this._settings.get_connection_by_path(connectionPath);
+
+            // connection might be null, if libnm-glib fails to create
+            // the object due to version incompatibility, or if the
+            // connection is not visible to the current user
+            if (connection && this._ignoreConnection(connection))
                 continue;
 
             supportedConnections.push(activeConnections[i]);